<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="org.wso2.carbon.registry.custom.dia.ui.utils.SaveDocumentUtil" %>
<%@ page import="org.wso2.carbon.registry.common.utils.RegistryUtil" %>
<%@ page import="org.wso2.carbon.registry.common.ui.UIException" %>
<%
    String esPath = request.getParameter("path");
    try {
        SaveDocumentUtil saveDoc = new SaveDocumentUtil(config, session);
        saveDoc.saveEndpointBean(esPath, request, config, session);
        saveDoc.saveTags(esPath, request, config, session);
        saveDoc.saveAssociations(esPath, request, config, session); //add related documents
    } catch (UIException e) {
        %>Could not save the endpoint details<%
        return;
    } 
    String eprMainPath = "dia_view_ajaxprocessor.jsp?path=" + esPath;
%>

<jsp:forward page="<%=eprMainPath%>"/>